package com.test.demo;

/**
 * ${DESCRIPTION}
 *
 * @author muxiaoyu
 * @create 2017/05/12 11:27
 **/
public class Animal<T> {
    private T t;
    private String name;
    private int id;

    public void Say() {
        System.out.println("i am " + this.toString());
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                ", id=" + id +
                '}';
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    public static void main(String[] args) {
        Animal<Object> objectAnimal = new Animal<Object>();
        objectAnimal.setT("99888");
        System.out.println(objectAnimal.getT());
    }
}
